package com.toast.back;




import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.SeekBar;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;

public class ToastbackActivity extends Activity implements View.OnClickListener {
    protected static final CharSequence EditText = null;
	/** Called when the activity is first created. */
    
    
    //paint.setColor(Color.WHITE);
	//paint.setAntiAlias(true);
	//canvas.drawCircle(red.getBallx(), red.getBally(), 55, paint);
	//paint.setColor(Color.BLUE);
	//canvas.drawCircle(blue.getBallx(), blue.getBally(), 55, paint);
	//paint.setColor(Color.RED);
	//canvas.drawCircle(yellow.getBallx(), yellow.getBally(), 55, paint);
	//invalidate();
    //SeekBar SpeedEdit = (SeekBar) findViewById(R.id.SpeedEdit);
	
	String textname,texthome,textView1,textView2,textView3,textView4,textage,textroom,textView5;
		
	String textbox = textname+texthome+textView1+textView2+textView3+textView4+textage+textroom+textView5;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
                
        EditText textname = (EditText) findViewById(R.id.textname);
        EditText textage = (EditText) findViewById(R.id.textage);
        EditText texthome = (EditText) findViewById(R.id.texthome);
        EditText textroom = (EditText) findViewById(R.id.textroom);
        TextView textView1 = (TextView) findViewById(R.id.textView1);
        TextView textView2 = (TextView) findViewById(R.id.textView2);
        TextView textView3 = (TextView) findViewById(R.id.textView3);
        TextView textView4 = (TextView) findViewById(R.id.textView4);
        TextView textView5 = (TextView) findViewById(R.id.textView5);
        Spinner spin = (Spinner) findViewById(R.id.spin);
        ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.Courses, android.R.layout.simple_spinner_item);
        spin.setAdapter(adapter);
                        
        Button Enter = (Button)findViewById(R.id.Enter);
        Enter.setOnClickListener(this);
    }

    public void onClick(View v) {
        EditText text = (EditText)findViewById(R.id.textname);
        EditText text1 = (EditText)findViewById(R.id.texthome);
        EditText text2 = (EditText)findViewById(R.id.textage);
        EditText text3 = (EditText)findViewById(R.id.textroom);
        TextView textView1 = (TextView) findViewById(R.id.textView1);
        TextView textView2 = (TextView) findViewById(R.id.textView2);
        TextView textView3 = (TextView) findViewById(R.id.textView3);
        TextView textView4 = (TextView) findViewById(R.id.textView4);
        ArrayAdapter adapter = ArrayAdapter.createFromResource(this, R.array.Courses, android.R.layout.simple_spinner_item);
        Spinner spin = (Spinner) findViewById(R.id.spin);
        
        
        Toast toast = Toast.makeText(getApplicationContext(),
        		textView1.getText().toString()+text.getText().toString()+
        		"\n"+
        		textView4.getText().toString()+text1.getText().toString()+
        		"\n"+
        		textView2.getText().toString()+text2.getText().toString()+
        		"\n"+
        		textView3.getText().toString()+text3.getText().toString()+
        		"\n"+
        		textView4.getText().toString()+spin.getSelectedItem().toString()
        		,Toast.LENGTH_SHORT) ;
        
        toast.show();       
    }

	

			}
        
        
        
   
